Skip to content

Set allowed bot names in claude code action - #69

Merged
masih merged 2 commits into
mainfrom
masih/fix-allowed-bot-name
Sep 1, 2026
Merged

Set allowed bot names in claude code action#69
masih merged 2 commits into
mainfrom
masih/fix-allowed-bot-name

Conversation

@masih

@masih masih commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Pass the set allowed bot names to claude code action.

Pass the set allowed bot names to claude code action.
@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Single workflow input wiring change with no auth logic changes beyond passing through an existing allowlist.

Overview
The Combined review step now forwards the reusable workflow’s allowed-bots input to anthropics/claude-code-action@v1 as allowed_bots.

The value is built by parsing the JSON array input and joining logins with commas; if the input is empty, an empty string is passed. This aligns the action’s bot allowlist with the same allowed-bots configuration already used in preflight for re-review authorization.

Reviewed by Cursor Bugbot for commit 9876631. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single-line change forwarding the reusable workflow's allowed-bots JSON array to claude-code-action's comma-separated allowed_bots input; the conversion and default ('[]' → empty string) are correct and login formatting stays consistent with the preflight allowlist. One non-blocking robustness note: the new unguarded fromJSON makes an empty-string allowed-bots a hard failure on every event, unlike the other two consumers of that input.

Findings: 0 blocking | 1 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread .github/workflows/ai-review.yml Outdated
anthropic_service_account_id: ${{ vars.PLATFORM_CODE_AGENT_ANTHROPIC_SVAC_ID }}
bot_id: ${{ vars.PLATFORM_CODE_AGENT_USER_ID }}
bot_name: 'seidroid[bot]'
allowed_bots: ${{ join(fromJSON(inputs.allowed-bots), ',') }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] fromJSON is evaluated unconditionally here, on every event including the automatic pull_request path. Elsewhere the workflow deliberately tolerates an empty value — the authorization script uses JSON.parse(process.env.ALLOWED_BOTS || "[]") (line 325), and the preflight if: only reaches fromJSON(inputs.allowed-bots) on comment events. So a caller that passes allowed-bots: '' instead of the documented '[]' would previously still get automatic reviews, but will now fail this job with an expression-evaluation error on every PR.

Guarding keeps the tolerance consistent:

allowed_bots: ${{ inputs.allowed-bots != '' && join(fromJSON(inputs.allowed-bots), ',') || '' }}

@masih
masih merged commit 93ebad0 into main Sep 1, 2026
5 checks passed
@masih
masih deleted the masih/fix-allowed-bot-name branch September 1, 2026 12:12
masih added a commit to sei-protocol/sei-chain that referenced this pull request Sep 1, 2026
Testing here since this is a bot authored PR.

See: sei-protocol/uci#69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant